<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<link rel="stylesheet" href="static/css/bootstrap.min.css" />
	<link rel = "stylesheet" href = "static/css/globle.css"/>
	<title></title>
	<script type="text/javascipt" src = "static/js/jquery.js"></script>
</head>
<body>
	  <div class="navbar navbar-fixed-top">
			<div class="navbar-inner">
				<div class="container">
					<a  class = "brand" href="#" id = "manager">项目管理系统</a>
			
				</div>
			</div>
		 </div>
	<div class="container" style = "margin-top:40px">
		<div class="row">
			<div class="span12">
				<div class="page-header">
					<h1>编辑任务</h1>
				</div>
			</div>
		</div>
		<div class="row">
			<div class = "span12">
			    <form class="form-horizontal" action = "task.jspx?_m=editTask" method = "post">
				    <fieldset>
					    <div class="control-group">
						    <label class="control-label" for="input01">任务名称</label>
						    <div class="controls">
						    <input style = "width:450px" type="text" class="input-xlarge" id="input01" x-webkit-speech x-webkit-grammar = "builtin:translate" name = "name" value = "${task.t_name }">
						    <p class="help-block">Supporting help text</p>
					    	</div>
					    </div>
					    <div class="control-group">
						    <label class="control-label" for="input01">开始时间</label>
						    <div class="controls">
						    <input style = "width:450px" type="text" class="input-xlarge" id="input01" x-webkit-speech x-webkit-grammar = "builtin:translate" name = "begin" value = "${task.t_begin }">
					    	</div>
					    </div>
					    <div class="control-group">
						    <label class="control-label" for="input01">截止时间</label>
						    <div class="controls">
						    <input style = "width:450px" type="text" class="input-xlarge" id="input01" x-webkit-speech x-webkit-grammar = "builtin:translate" name = "end" value = "${task.t_end }">
					    	</div>
					    </div>
					    <div class="control-group" >
				            <label for="textarea" class="control-label">任务的主要描述</label>
				            <div class="controls">
				              <textarea rows="10" id="textarea" class="input-xlarge" style = "width:450px" name = "dec">${task.t_dec}</textarea>
				            </div>
				         </div>
				         
				           <div class="control-group">
				            <label for="select01" class="control-label">状态</label>
				            <div class="controls">
				              <select id="select01" name = "stat">
				                <option>新任务</option>
				                <option>进行中</option>
				                <option>已完成</option>
				                
				              </select>
				            </div>
				          </div>
				          
				            <div class="control-group">
				            <label for="select01" class="control-label">级别</label>
				            <div class="controls">
				              <select id="select01" name = "level">
				              <c:choose>
					              	<c:when test = "${task.t_level == '重要紧急' }">
						                <option selected = "selected">重要紧急</option>
					              	</c:when>
					              	<c:otherwise>
					              		 <option>重要紧急</option>
					              	</c:otherwise>
				                </c:choose>
				                <c:choose>
					              	<c:when test = "${task.t_level == '重要不紧急' }">
						                <option selected = "selected">重要不紧急</option>
					              	</c:when>
					              	<c:otherwise>
					              		 <option>重要不紧急</option>
					              	</c:otherwise>
				              	</c:choose>
				                <c:choose>
					              	<c:when test = "${task.t_level == '紧急不重要' }">
						                <option selected = "selected">紧急不重要</option>
					              	</c:when>
					              	<c:otherwise>
					              		 <option>紧急不重要</option>
					              	</c:otherwise>
				              	</c:choose>
				               
				                 <c:choose>
					              	<c:when test = "${task.t_level == '不紧急不重要' }">
						                <option selected = "selected">不紧急不重要</option>
					              	</c:when>
					              	<c:otherwise>
					              		 <option>不紧急不重要</option>
					              	</c:otherwise>
				              </c:choose>
				              </select>
				            </div>
				          </div>
				         
				           <div class="control-group">
				            <label for="select01" class="control-label">负责人</label>
				            <div class="controls">
				              <select id="select01" name = "manager">
				               	<c:forEach items = "${members}" var = "m">
				                	<option value = "${m.m_name}">${m.m_name }</option>
				                </c:forEach>
				              </select>
				            </div>
				          </div>
				       	<div class="control-group">
						    <label class="control-label" for="input01">当前进度</label>
						    <div class="controls">
					    	</div>
						    <input style = "width:450px" type="text" class="input-xlarge" id="rate" x-webkit-speech x-webkit-grammar = "builtin:translate" name = "rate" value = "${task.t_rate }"><span id = "num-error"></span>
					    </div>
				          
				        
					     <div class="form-actions" style = "background-color:white;border-top:none">
				            <button class="btn btn-primary" type="submit" id = "btn">保存</button>
				            <button class="btn" type = "submit" id = "btn">返回</button>
				          </div>
				    </fieldset>
				 </form>
				</div>
		</div>
				
	</div>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#btn").click(function(){
				var rate = $("#rate").val();
				alert(rate);
			if(rate.matches("[0-9]{0,1,2}")){
				$("#num-error").html("√");
			}else{
				$("#num-error").html("请按要求输入");
				return;
			}
			})
			
		})
	</script>
</body>
</html>